def xie(ercuo):
    import os
    #将错题答案写入文件中。
    #是不是被我的命名习惯惊艳到了~
    desktop_dir = ''
    if 'HOMEPATH' in os.environ: # Windows
        desktop_dir = os.path.join(os.environ['USERPROFILE'], 'Desktop')
    elif 'HOME' in os.environ: # MacOS and Linux
        desktop_dir = os.path.expanduser('~/Desktop')
    else:
        print("无法确定桌面路径")
    file_name = '错题集.txt'
    full_path = os.path.join(desktop_dir, file_name)
    with open(full_path,'a+') as vue:   #这个"cuowu.txt"要自己建一个
        php = vue.read()
        for i in ercuo:
            css = ercuo[i]
            print(i, ':', css)
            if i in php:
                pass
            else:
                vue.write("'")
                vue.write(i)
                vue.write("'")
                vue.write(':')
                vue.write("'")
                vue.write(css)
                vue.write("',")
                vue.write('\n')
